<script setup>
//import HelloWorld from './components/HelloWorld.vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
// //import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'


import { reactive } from 'vue'
import { ConfigProvider } from 'ant-design-vue'

// 直接官网复制的代码
const colorState = reactive({
    primaryColor: '#25b864',
    errorColor: '#ff4d4f',
    warningColor: '#faad14',
    successColor: '#52c41a',
    infoColor: '#1890ff',
})
ConfigProvider.config({
    theme: colorState,
})
</script>

<template>
  <!-- <div>
    <li>{{ $t('header.home') }}</li>
    <a
      href="https://vitejs.dev"
      target="_blank"
    >
      <img
        src="/vite.svg"
        class="logo"
        alt="Vite logo"
      >
    </a>
    <a
      href="https://vuejs.org/"
      target="_blank"
    >
      <img
        src="./assets/vue.svg"
        class="logo vue"
        alt="Vue logo"
      >
    </a>
    <HelloWorld msg="Vite + Vue" />
    -----------------
  </div> -->
  <a-config-provider :locale="zhCN">
    <router-view v-slot="{ Component }">
      <transition name="fade" :appear="true" :duration="{enter:800, leave:1000}">
        <keep-alive>
          <component :is="Component" />
        </keep-alive>
      </transition>
    </router-view>
  </a-config-provider>
</template>

<style lang="less" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: left;
  color: #da9517;
  width: 100%;
  height: 100%;
}
.fade-enter-active,
.fade-leave-active {
  transition: all 2s ease;
}
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
</style>
